package net.jlnx.Uebung4_1.data;

public abstract class FigMZLA extends Figur {

	protected int A = 0;
	protected int B = 0;
	protected String figurenTyp = "";
	protected static double gesamtFlaeche = 0;

	public FigMZLA(int posX, int posY, int posZ, int a, int b) {
		super(posX, posY, posZ);
		this.A = a;
		this.B = b;

		gesamtFlaeche += this.berechneFlaeche();
		super.elementFlaeche = this.berechneFlaeche();
	}

	public abstract double berechneFlaeche();

	public String toString() {
		return this.figurenTyp + " an Position (" + super.X + ", " + super.Y
				+ ", " + super.Z + ") mit einer Fläche von "
				+ this.berechneFlaeche() + " Flächeneinheiten.";
	}

}